package com.hotel.servertImpl;

import java.util.List;

import com.hotel.Impl.UserDaoImpl;
import com.hotel.dao.UserDao;
import com.hotel.entity.Superuser;
import com.hotel.entity.Yhuser;
import com.hotel.servert.UserServert;

public class UsertServertImpl implements UserServert {
	private UserDao userdao= new UserDaoImpl();

	@Override
	public Superuser userLogin(Superuser s) {
		
		return userdao.userLogin(s);
	}

	@Override
	public List<Yhuser> yhuserAll() {
		
		return userdao.yhuserAll();
		
	}

	@Override
	public boolean adduser(Yhuser user) {
		int a=userdao.adduser(user);
		if(a>0){
			return true;
			
		}
		return false;
	}

	@Override
	public boolean deleteuser(int id) {
		int e=userdao.deleteuser(id);
		if(e>0){
			return true;
		}
		return false;
	}

	
	@Override
	public boolean updateYh(Yhuser user) {
		int i=userdao.updateYh(user);
		if(i>0){
			return true;
		}
		
		return false;
	}

	@Override
	public Yhuser getHotelById(int id) {
		
		return userdao.getHotelById(id);
	}
	

}
